//
//  WebViewController.swift
//  Weobo
//
//  Created by 史亚洲 on 16/2/6.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class WebViewController: UIViewController {

    let webView=UIWebView()
    var urlString: String?
    
    override func loadView() {
        view=webView
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        loadPage()
    }
    
    private func loadPage(){
        guard let str=urlString else{
            return
        }
        let url=NSURL(string: str)!
        
        //获取request对象
        let request=NSURLRequest(URL: url)
        
        webView.loadRequest(request)
    }
}
